package HomeWork4;

public class SellTest {
    public static void main(String[] args) {
        SellThread sellThread1 = new SellThread();
        SellThread sellThread2 = new SellThread();
        SellThread sellThread3 = new SellThread();
        Ticket ticket = new Ticket(100);
        sellThread1.set(ticket);
        sellThread2.set(ticket);
        sellThread3.set(ticket);
        sellThread1.start();
        sellThread2.start();
        sellThread3.start();
        SellRunnable sellRunnable1 = new SellRunnable();
        SellRunnable sellRunnable2 = new SellRunnable();
        SellRunnable sellRunnable3 = new SellRunnable();
        sellRunnable1.set(ticket);
        sellRunnable2.set(ticket);
        sellRunnable3.set(ticket);
        Thread thread1 = new Thread(sellRunnable1);
        Thread thread2 = new Thread(sellRunnable2);
        Thread thread3 = new Thread(sellRunnable3);
        thread1.start();
        thread2.start();
        thread3.start();


    }
}
